Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: PR 6782 w/ PR 6783 #6784

Closed
wants to merge 11 commits into from
Closed

chore: PR 6782 w/ PR 6783 #6784

wants to merge 11 commits into from

Conversation

vezenovm
Copy link
Contributor

Description

Problem*

Resolves

Summary*

Pushed to see the bench report of #6782 with the #6783 optimization.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Changes to Brillig bytecode sizes

Generated at commit: 8e089924e22b61ca4dce0ac0029d284e8eadfcb2, compared to commit: 919149d3413be5232b33611094687fdb5fd86086

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
sha256_var_size_regression -178 ✅ -9.35%
slices -228 ✅ -9.44%
reference_counts -63 ✅ -11.75%
nested_array_dynamic -330 ✅ -11.84%
nested_array_in_slice -213 ✅ -14.74%
slice_regex -396 ✅ -15.06%
wildcard_type -57 ✅ -16.06%
nested_array_dynamic_simple -33 ✅ -24.09%
fold_complex_outputs -159 ✅ -24.84%
brillig_nested_arrays -225 ✅ -55.28%

Full diff report 👇
Program Brillig opcodes (+/-) %
regression_4709 133,737 (-3) -0.00%
debug_logs 5,148 (-36) -0.69%
slice_dynamic_index 2,507 (-18) -0.71%
fold_numeric_generic_poseidon 763 (-6) -0.78%
no_predicates_numeric_generic_poseidon 763 (-6) -0.78%
pedersen_hash 373 (-3) -0.80%
bench_2_to_17 328 (-3) -0.91%
array_dynamic 319 (-3) -0.93%
modulus 1,762 (-18) -1.01%
check_large_field_bits 292 (-3) -1.02%
array_dedup_regression 259 (-3) -1.15%
to_be_bytes 212 (-3) -1.40%
pedersen_commitment 209 (-3) -1.42%
fold_2_to_17 584 (-9) -1.52%
regression 945 (-15) -1.56%
hashmap 21,801 (-350) -1.58%
brillig_oracle 370 (-6) -1.60%
poseidon_bn254_hash_width_3 5,425 (-110) -1.99%
poseidon_bn254_hash 5,425 (-110) -1.99%
sha2_byte 2,767 (-57) -2.02%
7_function 579 (-12) -2.03%
7 144 (-3) -2.04%
blake3 144 (-3) -2.04%
hash_to_field 139 (-3) -2.11%
aes128_encrypt 552 (-12) -2.13%
keccak256 2,197 (-48) -2.14%
loop_invariant_regression 137 (-3) -2.14%
u128 2,757 (-63) -2.23%
6_array 392 (-9) -2.24%
simple_shield 908 (-21) -2.26%
conditional_regression_661 127 (-3) -2.31%
conditional_2 116 (-3) -2.52%
sha256_regression 6,917 (-180) -2.54%
array_dynamic_blackbox_input 1,032 (-27) -2.55%
hint_black_box 336 (-9) -2.61%
conditional_1 1,188 (-33) -2.70%
uhashmap 14,004 (-411) -2.85%
strings 917 (-27) -2.86%
poseidonsponge_x5_254 4,251 (-126) -2.88%
if_else_chain 101 (-3) -2.88%
brillig_cow_regression 2,167 (-66) -2.96%
ram_blowup_regression 969 (-30) -3.00%
ecdsa_secp256k1 908 (-30) -3.20%
sha256_var_padding_regression 5,129 (-171) -3.23%
nested_dyn_array_regression_5782 172 (-6) -3.37%
regression_5252 4,594 (-162) -3.41%
conditional_regression_421 83 (-3) -3.49%
pedersen_check 565 (-21) -3.58%
brillig_pedersen 565 (-21) -3.58%
regression_4449 751 (-30) -3.84%
brillig_cow 372 (-15) -3.88%
simple_radix 74 (-3) -3.90%
sha256_var_witness_const_regression 1,308 (-54) -3.96%
array_dynamic_nested_blackbox_input 901 (-39) -4.15%
higher_order_functions 677 (-30) -4.24%
slice_loop 269 (-12) -4.27%
sha256_brillig_performance_regression 1,662 (-75) -4.32%
bigint 2,195 (-102) -4.44%
sha256 2,408 (-120) -4.75%
conditional_regression_short_circuit 1,264 (-63) -4.75%
array_to_slice 718 (-36) -4.77%
6 1,191 (-60) -4.80%
global_consts 227 (-12) -5.02%
brillig_uninitialized_arrays 51 (-3) -5.56%
to_bits 201 (-12) -5.63%
regression_6674_1 247 (-15) -5.73%
to_bytes_integration 88 (-6) -6.38%
regression_5045 87 (-6) -6.45%
side_effects_constrain_array 129 (-9) -6.52%
brillig_constant_reference_regression 84 (-6) -6.67%
merkle_insert 765 (-55) -6.71%
regression_6674_2 250 (-18) -6.72%
databus_composite_calldata 390 (-30) -7.14%
struct_inputs 258 (-21) -7.53%
simple_2d_array 106 (-9) -7.83%
brillig_rc_regression_6123 170 (-15) -8.11%
to_bytes_consistent 135 (-12) -8.16%
regression_6674_3 555 (-54) -8.87%
to_le_bytes 122 (-12) -8.96%
regression_struct_array_conditional 576 (-57) -9.00%
sha256_var_size_regression 1,726 (-178) -9.35%
slices 2,186 (-228) -9.44%
reference_counts 473 (-63) -11.75%
nested_array_dynamic 2,457 (-330) -11.84%
nested_array_in_slice 1,232 (-213) -14.74%
slice_regex 2,233 (-396) -15.06%
wildcard_type 298 (-57) -16.06%
nested_array_dynamic_simple 104 (-33) -24.09%
fold_complex_outputs 481 (-159) -24.84%
brillig_nested_arrays 182 (-225) -55.28%

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Changes to number of Brillig opcodes executed

Generated at commit: 8e089924e22b61ca4dce0ac0029d284e8eadfcb2, compared to commit: 919149d3413be5232b33611094687fdb5fd86086

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
side_effects_constrain_array -9 ✅ -9.47%
slice_regex -387 ✅ -10.02%
nested_array_in_slice -201 ✅ -11.39%
wildcard_type -75 ✅ -12.65%
reference_counts -60 ✅ -12.96%
regression_4449 -38,288 ✅ -16.01%
fold_complex_outputs -156 ✅ -16.88%
nested_array_dynamic_simple -33 ✅ -26.83%
array_dedup_regression -431 ✅ -38.90%
brillig_nested_arrays -225 ✅ -59.21%

Full diff report 👇
Program Brillig opcodes (+/-) %
sha2_byte 47,309 (+335) +0.71%
bench_2_to_17 589,841 (-3) -0.00%
fold_2_to_17 1,093,925 (-9) -0.00%
modulus 19,172 (-18) -0.09%
check_large_field_bits 2,740 (-3) -0.11%
to_be_bytes 2,452 (-3) -0.12%
brillig_oracle 2,751 (-6) -0.22%
u128 24,962 (-63) -0.25%
aes128_encrypt 4,719 (-12) -0.25%
loop_invariant_regression 1,164 (-3) -0.26%
7 1,106 (-3) -0.27%
blake3 1,106 (-3) -0.27%
to_bytes_integration 2,065 (-6) -0.29%
hash_to_field 908 (-3) -0.33%
keccak256 34,777 (-120) -0.34%
slice_dynamic_index 4,667 (-18) -0.38%
pedersen_hash 669 (-3) -0.45%
7_function 2,537 (-12) -0.47%
to_le_bytes 1,152 (-6) -0.52%
regression 2,816 (-15) -0.53%
array_dynamic 498 (-3) -0.60%
global_consts 1,773 (-12) -0.67%
poseidonsponge_x5_254 183,750 (-1,260) -0.68%
debug_logs 5,160 (-36) -0.69%
regression_5252 915,026 (-9,354) -1.01%
pedersen_commitment 293 (-3) -1.01%
hint_black_box 717 (-9) -1.24%
6_array 1,631 (-21) -1.27%
brillig_cow 1,140 (-15) -1.30%
fold_numeric_generic_poseidon 5,143 (-69) -1.32%
no_predicates_numeric_generic_poseidon 5,143 (-69) -1.32%
strings 1,770 (-27) -1.50%
to_bytes_consistent 754 (-12) -1.57%
uhashmap 145,549 (-2,455) -1.66%
regression_6674_1 819 (-15) -1.80%
slice_loop 942 (-18) -1.88%
to_bits 614 (-12) -1.92%
sha256_brillig_performance_regression 23,194 (-456) -1.93%
brillig_cow_regression 519,086 (-10,376) -1.96%
ram_blowup_regression 778,650 (-15,953) -2.01%
array_to_slice 1,670 (-36) -2.11%
brillig_pedersen 972 (-21) -2.11%
pedersen_check 972 (-21) -2.11%
regression_6674_2 822 (-18) -2.14%
sha256_var_padding_regression 222,216 (-4,943) -2.18%
higher_order_functions 1,255 (-30) -2.33%
conditional_regression_661 120 (-3) -2.44%
conditional_2 119 (-3) -2.46%
poseidon_bn254_hash 162,594 (-4,644) -2.78%
poseidon_bn254_hash_width_3 162,594 (-4,644) -2.78%
sha256_regression 118,707 (-3,397) -2.78%
ecdsa_secp256k1 6,789 (-200) -2.86%
regression_struct_array_conditional 1,679 (-51) -2.95%
if_else_chain 98 (-3) -2.97%
hashmap 54,143 (-1,739) -3.11%
regression_6674_3 1,615 (-54) -3.24%
conditional_regression_421 89 (-3) -3.26%
nested_dyn_array_regression_5782 171 (-6) -3.39%
conditional_1 5,717 (-203) -3.43%
sha256_var_witness_const_regression 7,200 (-266) -3.56%
struct_inputs 566 (-21) -3.58%
simple_shield 2,871 (-113) -3.79%
simple_radix 69 (-3) -4.17%
sha256 14,996 (-672) -4.29%
array_dynamic_nested_blackbox_input 4,550 (-209) -4.39%
databus_composite_calldata 617 (-30) -4.64%
slices 3,365 (-171) -4.84%
brillig_rc_regression_6123 290 (-15) -4.92%
conditional_regression_short_circuit 7,528 (-400) -5.05%
6 7,450 (-400) -5.10%
sha256_var_size_regression 16,377 (-957) -5.52%
array_dynamic_blackbox_input 18,209 (-1,141) -5.90%
brillig_uninitialized_arrays 44 (-3) -6.38%
simple_2d_array 125 (-9) -6.72%
brillig_constant_reference_regression 81 (-6) -6.90%
merkle_insert 3,769 (-284) -7.01%
nested_array_dynamic 3,464 (-309) -8.19%
side_effects_constrain_array 86 (-9) -9.47%
slice_regex 3,474 (-387) -10.02%
nested_array_in_slice 1,564 (-201) -11.39%
wildcard_type 518 (-75) -12.65%
reference_counts 403 (-60) -12.96%
regression_4449 200,857 (-38,288) -16.01%
fold_complex_outputs 768 (-156) -16.88%
nested_array_dynamic_simple 90 (-33) -26.83%
array_dedup_regression 677 (-431) -38.90%
brillig_nested_arrays 155 (-225) -59.21%

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Peak Memory Sample

Program Peak Memory
keccak256 79.14M
workspace 121.75M
regression_4709 295.99M
ram_blowup_regression 2.44G
private-kernel-tail 210.43M
private-kernel-reset 862.08M
private-kernel-inner 307.78M
parity-root 175.78M

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Compilation Sample

Program Compilation Time %
sha256_regression 0m1.447s -1%
regression_4709 0m0.775s 1%
ram_blowup_regression 0m16.768s -2%
private-kernel-tail 0m1.433s 16%
private-kernel-reset 0m9.388s 3%
private-kernel-inner 0m2.300s -15%
parity-root 0m0.892s -6%
noir-contracts 2m38.430s -3%

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Changes to circuit sizes

Generated at commit: 8e089924e22b61ca4dce0ac0029d284e8eadfcb2, compared to commit: 919149d3413be5232b33611094687fdb5fd86086

🧾 Summary (10% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
regression_struct_array_conditional -16 ✅ -18.39% -24 ✅ -0.74%
nested_array_in_slice -70 ✅ -6.48% -151 ✅ -2.65%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
array_dynamic_nested_blackbox_input 253 (-12) -4.53% 7,326 (-35) -0.48%
regression_struct_array_conditional 71 (-16) -18.39% 3,203 (-24) -0.74%
nested_array_in_slice 1,010 (-70) -6.48% 5,550 (-151) -2.65%

@vezenovm
Copy link
Contributor Author

#6782 has been approved so we can look at the bench on #6783 itself now

@vezenovm vezenovm closed this Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant